{
	//gROOT->ProcessLine(".L ~/work/geant4/tmp/Darwin-g++/g4test/libTTrackerHit.so");
	gROOT->ProcessLine(".L ~/work/geant4/tmp/Darwin-g++/g4test/libTEvent.so");
	TFile *file = TFile::Open("test.root","update");
	TTree *t = (TTree*)file->Get("t");

	TEvent* evt = new TEvent();
	t->SetBranchAddress("evt",&evt);
	int nevents = t->GetEntries();
	TH1F *h1 = new TH1F("h1","h1",1000,0,4000);

	for (int i = 0; i < nevents; i++) {
		t->GetEntry(i);
		h1->Fill(evt->GetEdep(0));

	}
	h1->Write();

}
